package d0324;

import java.sql.SQLOutput;

public class StringTest {
    public static void main(String[] args) {

               String s="beijingETC";
                int i=10;
                char[] c1={'h','e','l','l','o'};
                System.out.println(s.indexOf("i"));
                System.out.println(s.lastIndexOf("i"));
                System.out.println(s.indexOf("i",3));
                System.out.println(s.indexOf("jing"));
                System.out.println(s.indexOf("jing",4));
                System.out.println(s.charAt(2));
                String si=String.valueOf(i);
                String sc1=String.valueOf(c1);
                String sc2=String.valueOf(c1,1,4);
                System.out.println(sc1);
                System.out.println(sc2);

        String str3="jack,22,dalain";
     //   String[] arr=str3.split(",");
     //   for (int i=0;i<arr.length;i++){
      //      System.out.println(arr[i]);
     //   }
        String  str4=str3.replaceAll(",","-");
        System.out.println(str4);
    }
}
